import {Provider} from "./base";
import {ethers} from 'ethers';

export function getETSCBalance(address) {
    return Provider.ETSC.getBalance(address).then((balance) => {
        // balance is a BigNumber (in wei); format is as a sting (in ether)
        return ethers.utils.formatEther(balance);
    });
}

export async function getETSCGasPrice() {
    return await Provider.ETSC.getGasPrice();
}

///////////////////////////////////////////////////////////////////////////////////////////////////////

export function getETHBalance(address) {
    return Provider.ETH.getBalance(address).then((balance) => {
        // balance is a BigNumber (in wei); format is as a sting (in ether)
        return ethers.utils.formatEther(balance);
    });
}

export async function getETHGasPrice() {
    return await Provider.ETH.getGasPrice();
}




